Optimal. Leaf size=227 \[ \frac{2 i \sqrt{a^2 x^2+1} \tan ^{-1}(a x) \text{PolyLog}\left (2,-e^{i \tan ^{-1}(a x)}\right )}{\sqrt{a^2 c x^2+c}}-\frac{2 i \sqrt{a^2 x^2+1} \tan ^{-1}(a x) \text{PolyLog}\left (2,e^{i \tan ^{-1}(a x)}\right )}{\sqrt{a^2 c x^2+c}}-\frac{2 \sqrt{a^2 x^2+1} \text{PolyLog}\left (3,-e^{i \tan ^{-1}(a x)}\right )}{\sqrt{a^2 c x^2+c}}+\frac{2 \sqrt{a^2 x^2+1} \text{PolyLog}\left (3,e^{i \tan ^{-1}(a x)}\right )}{\sqrt{a^2 c x^2+c}}-\frac{2 \sqrt{a^2 x^2+1} \tan ^{-1}(a x)^2 \tanh ^{-1}\left (e^{i \tan ^{-1}(a x)}\right )}{\sqrt{a^2 c x^2+c}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.252572, antiderivative size = 227, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 6, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {4958, 4956, 4183, 2531, 2282, 6589} \[ \frac{2 i \sqrt{a^2 x^2+1} \tan ^{-1}(a x) \text{PolyLog}\left (2,-e^{i \tan ^{-1}(a x)}\right )}{\sqrt{a^2 c x^2+c}}-\frac{2 i \sqrt{a^2 x^2+1} \tan ^{-1}(a x) \text{PolyLog}\left (2,e^{i \tan ^{-1}(a x)}\right )}{\sqrt{a^2 c x^2+c}}-\frac{2 \sqrt{a^2 x^2+1} \text{PolyLog}\left (3,-e^{i \tan ^{-1}(a x)}\right )}{\sqrt{a^2 c x^2+c}}+\frac{2 \sqrt{a^2 x^2+1} \text{PolyLog}\left (3,e^{i \tan ^{-1}(a x)}\right )}{\sqrt{a^2 c x^2+c}}-\frac{2 \sqrt{a^2 x^2+1} \tan ^{-1}(a x)^2 \tanh ^{-1}\left (e^{i \tan ^{-1}(a x)}\right )}{\sqrt{a^2 c x^2+c}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4958
Rule 4956
Rule 4183
Rule 2531
Rule 2282
Rule 6589
Rubi steps
\begin{align*} \int \frac{\tan ^{-1}(a x)^2}{x \sqrt{c+a^2 c x^2}} \, dx &=\frac{\sqrt{1+a^2 x^2} \int \frac{\tan ^{-1}(a x)^2}{x \sqrt{1+a^2 x^2}} \, dx}{\sqrt{c+a^2 c x^2}}\\ &=\frac{\sqrt{1+a^2 x^2} \operatorname{Subst}\left (\int x^2 \csc (x) \, dx,x,\tan ^{-1}(a x)\right )}{\sqrt{c+a^2 c x^2}}\\ &=-\frac{2 \sqrt{1+a^2 x^2} \tan ^{-1}(a x)^2 \tanh ^{-1}\left (e^{i \tan ^{-1}(a x)}\right )}{\sqrt{c+a^2 c x^2}}-\frac{\left (2 \sqrt{1+a^2 x^2}\right ) \operatorname{Subst}\left (\int x \log \left (1-e^{i x}\right ) \, dx,x,\tan ^{-1}(a x)\right )}{\sqrt{c+a^2 c x^2}}+\frac{\left (2 \sqrt{1+a^2 x^2}\right ) \operatorname{Subst}\left (\int x \log \left (1+e^{i x}\right ) \, dx,x,\tan ^{-1}(a x)\right )}{\sqrt{c+a^2 c x^2}}\\ &=-\frac{2 \sqrt{1+a^2 x^2} \tan ^{-1}(a x)^2 \tanh ^{-1}\left (e^{i \tan ^{-1}(a x)}\right )}{\sqrt{c+a^2 c x^2}}+\frac{2 i \sqrt{1+a^2 x^2} \tan ^{-1}(a x) \text{Li}_2\left (-e^{i \tan ^{-1}(a x)}\right )}{\sqrt{c+a^2 c x^2}}-\frac{2 i \sqrt{1+a^2 x^2} \tan ^{-1}(a x) \text{Li}_2\left (e^{i \tan ^{-1}(a x)}\right )}{\sqrt{c+a^2 c x^2}}-\frac{\left (2 i \sqrt{1+a^2 x^2}\right ) \operatorname{Subst}\left (\int \text{Li}_2\left (-e^{i x}\right ) \, dx,x,\tan ^{-1}(a x)\right )}{\sqrt{c+a^2 c x^2}}+\frac{\left (2 i \sqrt{1+a^2 x^2}\right ) \operatorname{Subst}\left (\int \text{Li}_2\left (e^{i x}\right ) \, dx,x,\tan ^{-1}(a x)\right )}{\sqrt{c+a^2 c x^2}}\\ &=-\frac{2 \sqrt{1+a^2 x^2} \tan ^{-1}(a x)^2 \tanh ^{-1}\left (e^{i \tan ^{-1}(a x)}\right )}{\sqrt{c+a^2 c x^2}}+\frac{2 i \sqrt{1+a^2 x^2} \tan ^{-1}(a x) \text{Li}_2\left (-e^{i \tan ^{-1}(a x)}\right )}{\sqrt{c+a^2 c x^2}}-\frac{2 i \sqrt{1+a^2 x^2} \tan ^{-1}(a x) \text{Li}_2\left (e^{i \tan ^{-1}(a x)}\right )}{\sqrt{c+a^2 c x^2}}-\frac{\left (2 \sqrt{1+a^2 x^2}\right ) \operatorname{Subst}\left (\int \frac{\text{Li}_2(-x)}{x} \, dx,x,e^{i \tan ^{-1}(a x)}\right )}{\sqrt{c+a^2 c x^2}}+\frac{\left (2 \sqrt{1+a^2 x^2}\right ) \operatorname{Subst}\left (\int \frac{\text{Li}_2(x)}{x} \, dx,x,e^{i \tan ^{-1}(a x)}\right )}{\sqrt{c+a^2 c x^2}}\\ &=-\frac{2 \sqrt{1+a^2 x^2} \tan ^{-1}(a x)^2 \tanh ^{-1}\left (e^{i \tan ^{-1}(a x)}\right )}{\sqrt{c+a^2 c x^2}}+\frac{2 i \sqrt{1+a^2 x^2} \tan ^{-1}(a x) \text{Li}_2\left (-e^{i \tan ^{-1}(a x)}\right )}{\sqrt{c+a^2 c x^2}}-\frac{2 i \sqrt{1+a^2 x^2} \tan ^{-1}(a x) \text{Li}_2\left (e^{i \tan ^{-1}(a x)}\right )}{\sqrt{c+a^2 c x^2}}-\frac{2 \sqrt{1+a^2 x^2} \text{Li}_3\left (-e^{i \tan ^{-1}(a x)}\right )}{\sqrt{c+a^2 c x^2}}+\frac{2 \sqrt{1+a^2 x^2} \text{Li}_3\left (e^{i \tan ^{-1}(a x)}\right )}{\sqrt{c+a^2 c x^2}}\\ \end{align*}
Mathematica [A] time = 0.165126, size = 145, normalized size = 0.64 \[ \frac{\sqrt{a^2 x^2+1} \left (2 i \tan ^{-1}(a x) \text{PolyLog}\left (2,-e^{i \tan ^{-1}(a x)}\right )-2 i \tan ^{-1}(a x) \text{PolyLog}\left (2,e^{i \tan ^{-1}(a x)}\right )-2 \text{PolyLog}\left (3,-e^{i \tan ^{-1}(a x)}\right )+2 \text{PolyLog}\left (3,e^{i \tan ^{-1}(a x)}\right )+\tan ^{-1}(a x)^2 \log \left (1-e^{i \tan ^{-1}(a x)}\right )-\tan ^{-1}(a x)^2 \log \left (1+e^{i \tan ^{-1}(a x)}\right )\right )}{\sqrt{c \left (a^2 x^2+1\right )}} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.393, size = 198, normalized size = 0.9 \begin{align*} -{\frac{1}{c} \left ( \left ( \arctan \left ( ax \right ) \right ) ^{2}\ln \left ( 1+{(1+iax){\frac{1}{\sqrt{{a}^{2}{x}^{2}+1}}}} \right ) - \left ( \arctan \left ( ax \right ) \right ) ^{2}\ln \left ( 1-{(1+iax){\frac{1}{\sqrt{{a}^{2}{x}^{2}+1}}}} \right ) -2\,i\arctan \left ( ax \right ){\it polylog} \left ( 2,-{(1+iax){\frac{1}{\sqrt{{a}^{2}{x}^{2}+1}}}} \right ) +2\,i\arctan \left ( ax \right ){\it polylog} \left ( 2,{(1+iax){\frac{1}{\sqrt{{a}^{2}{x}^{2}+1}}}} \right ) +2\,{\it polylog} \left ( 3,-{\frac{1+iax}{\sqrt{{a}^{2}{x}^{2}+1}}} \right ) -2\,{\it polylog} \left ( 3,{\frac{1+iax}{\sqrt{{a}^{2}{x}^{2}+1}}} \right ) \right ) \sqrt{c \left ( ax-i \right ) \left ( ax+i \right ) }{\frac{1}{\sqrt{{a}^{2}{x}^{2}+1}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{\sqrt{a^{2} c x^{2} + c} \arctan \left (a x\right )^{2}}{a^{2} c x^{3} + c x}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\operatorname{atan}^{2}{\left (a x \right )}}{x \sqrt{c \left (a^{2} x^{2} + 1\right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\arctan \left (a x\right )^{2}}{\sqrt{a^{2} c x^{2} + c} x}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]